package com.greenline.search.report.entity;

import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: liulei
 * Date: 14-2-13
 * Time: 下午2:41
 * To change this template use File | Settings | File Templates.
 */
public class LogReportResult implements Serializable{
    //搜索关键词排行总榜
    private List<SearchWord> overallRankedList;
    //搜索关键词上升总榜
    private List<SearchWord> overallUpList;

    //搜索医生关键词排行总榜
    private List<SearchWord> doctorRankedList;
    //搜索医生关键词上升总榜
    private List<SearchWord> doctorUpList;

    //搜索疾病关键词排行总榜
    private List<SearchWord> diseaseRankedList;
    //搜索疾病关键词上升总榜
    private List<SearchWord> diseaseUpList;

    //搜索科室关键词排行总榜
    private List<SearchWord> departmentRankedList;
    //搜索科室关键词上升总榜
    private List<SearchWord> departmentUpList;

    //搜索医院关键词排行总榜
    private List<SearchWord> hospitalRankedList;
    //搜索医院关键词上升总榜
    private List<SearchWord> hospitalUpList;

    public List<SearchWord> getOverallRankedList() {
        return overallRankedList;
    }

    public void setOverallRankedList(List<SearchWord> overallRankedList) {
        this.overallRankedList = overallRankedList;
    }

    public List<SearchWord> getOverallUpList() {
        return overallUpList;
    }

    public void setOverallUpList(List<SearchWord> overallUpList) {
        this.overallUpList = overallUpList;
    }

    public List<SearchWord> getDoctorRankedList() {
        return doctorRankedList;
    }

    public void setDoctorRankedList(List<SearchWord> doctorRankedList) {
        this.doctorRankedList = doctorRankedList;
    }

    public List<SearchWord> getDoctorUpList() {
        return doctorUpList;
    }

    public void setDoctorUpList(List<SearchWord> doctorUpList) {
        this.doctorUpList = doctorUpList;
    }

    public List<SearchWord> getDiseaseRankedList() {
        return diseaseRankedList;
    }

    public void setDiseaseRankedList(List<SearchWord> diseaseRankedList) {
        this.diseaseRankedList = diseaseRankedList;
    }

    public List<SearchWord> getDiseaseUpList() {
        return diseaseUpList;
    }

    public void setDiseaseUpList(List<SearchWord> diseaseUpList) {
        this.diseaseUpList = diseaseUpList;
    }

    public List<SearchWord> getDepartmentRankedList() {
        return departmentRankedList;
    }

    public void setDepartmentRankedList(List<SearchWord> departmentRankedList) {
        this.departmentRankedList = departmentRankedList;
    }

    public List<SearchWord> getDepartmentUpList() {
        return departmentUpList;
    }

    public void setDepartmentUpList(List<SearchWord> departmentUpList) {
        this.departmentUpList = departmentUpList;
    }

    public List<SearchWord> getHospitalRankedList() {
        return hospitalRankedList;
    }

    public void setHospitalRankedList(List<SearchWord> hospitalRankedList) {
        this.hospitalRankedList = hospitalRankedList;
    }

    public List<SearchWord> getHospitalUpList() {
        return hospitalUpList;
    }

    public void setHospitalUpList(List<SearchWord> hospitalUpList) {
        this.hospitalUpList = hospitalUpList;
    }

    public List[] getAllList(){
        Class resultClass = LogReportResult.class;
        Field[] fields = resultClass.getDeclaredFields();
        List[] allList = new List[fields.length];
        for(int i = 0; i < fields.length; i++){
            try {
                allList[i] = (List) fields[i].get(this);
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            }
        }
        return  allList;
    }

    public static void main(String[] args) {
        LogReportResult reportResult = new LogReportResult();
        List<SearchWord> searchWordList = new ArrayList<SearchWord>();
        searchWordList.add(new SearchWord());
        reportResult.setDepartmentRankedList(searchWordList);
        for(List<SearchWord> wordList : reportResult.getAllList()){
            System.out.println(wordList instanceof List);
        }
    }
}
